package main

import "fmt"

type SignedInt interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uintptr
}

type UnsignedInt interface {
	~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr
}

type MyInt interface {
	SignedInt | UnsignedInt
}

type Reader interface {
	Read(p []byte) (n int, err error)
}

type Writer interface {
	Write(p []byte) (n int, err error)
}

type Closer interface {
	Close() error
}

type ReadWriter interface {
	Reader
	Writer
}

type ReadCloser interface {
	Reader
	Closer
}

type Sayer interface {
	Say()
}

type Mover interface {
	Move()
}

type Cat struct {
}

func (Cat) Say() {
	fmt.Println("喵喵~")
}

func (*Cat) Move() {
	fmt.Println("抓老鼠")
}

type Dog struct {
}

func (Dog) Say() {
	fmt.Println("汪汪~")
}

func (*Dog) Move() {
	fmt.Println("摇尾巴")
}

func ListonSay(a Sayer) {
	a.Say()
}

func SeeMove(m Mover) {
	m.Move()
}
